package whf.framework.web.tag.ext;

import whf.framework.web.tag.enums.SeverityEnum;

/**
 * Exception thrown when a Tag is not properly nested into another one.
 * 
 * @author Fabrizio Giustina
 * @version $Revision: 1.1 $ ($Author: king $)
 */
public class TagStructureException extends BaseNestableJspTagException {

	/**
	 * D1597A17A6.
	 */
	private static final long serialVersionUID = 899149338534L;

	/**
	 * Constructor for InvalidTagAttributeValueException.
	 * 
	 * @param source
	 *            Class where the exception is generated
	 * @param currentTag
	 *            name of the current tag
	 * @param shoudBeNestedIn
	 *            missing parent tag
	 */
	public TagStructureException(Class source, String currentTag,
			String shoudBeNestedIn) {
		super(source, currentTag+" must be nested in "+shoudBeNestedIn);
	}

	/**
	 * @return SeverityEnum.ERROR
	 * @see org.displaytag.exception.BaseNestableJspTagException#getSeverity()
	 * @see org.displaytag.exception.SeverityEnum
	 */
	public SeverityEnum getSeverity() {
		return SeverityEnum.ERROR;
	}

	public TagStructureException(Class source, String message, Throwable cause) {
		super(source, message, cause);
	}

	public TagStructureException(Class source, String message) {
		super(source, message);
	}

}